//
//  UserManager.h
//  MiAiApp
//
//  Created by 徐阳 on 2017/5/22.
//  Copyright © 2017年 徐阳. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserInfo.h"

#define kUserInfo [[UserManager sharedUserManager] curUserInfo]
#define kToken [[UserManager sharedUserManager] getToken]
#define kIsTourst  (kToken.length == 0)
/*
 包含用户相关服务
 */
@interface UserManager : NSObject
//单例
+ (instancetype)sharedUserManager;
//当前用户信息
@property (nonatomic, strong)UserInfo *userInfo;
-(NSString *)getToken;
-(void)saveUserInfo:(NSDictionary *)data;
-(UserInfo *)curUserInfo;
-(void)clearUserInfo;

//更新本地缓存
+(void)updateUserDeviceListWith:(NSArray <SLLockModel *>*)deviceList;
//
+(void)insertUserDeviceWith:(SLLockModel *)model;
//
+(void)deleteUserDeviceWith:(SLLockModel *)deviceModel;
+(NSArray *)getUserDeviceList;

//获取产品型号
+(NSArray <SLProductModel *>*)getProductList;
+(void)updateProductListWith:(NSArray *)productList;
@property (nonatomic, strong)NSMutableString *chatStr;
@property(nonatomic,strong)UIView *chatView;//日志查看视图
+(void)updateLogViewWithMessage:(NSString *)message needUnicode:(BOOL)needUnicode;
@end
